package com.xcm.sso;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * 配置文件配置类
 * created by lq at 2018-05-14 9:27
 *
 * @author linq
 */
@Component("ssoProperties")
@ConfigurationProperties(prefix = "sso")
public class SSOProperties {
    /**
     * 系统标志（统一账户管理系统）
     */
    private String systemSignPortal;
    /**
     * 系统标志（dmp）
     */
    private String systemSignDmp;
    /**
     * 系统标志（网络发布平台）
     */
    private String systemSignXcips;
    /**
     * DESUtils加解密秘钥
     */
    private String secretKey;
    /**
     * 不需要拦截的url地址
     */
    private List<String> excludeUrls = new ArrayList<>();
    /**
     * 静态资源后缀名称
     */
    private List<String> staticResourceSufixs = new ArrayList<>();
    /**
     * ticket过期时间(单位秒)
     */
    private int ticketTimeout;
    /**
     * 不过期时间
     */
    private int ticketTimeoutNever = -1;
    /**
     * 登录票据缓存名
     */
    private String ssoTicketsCacheName;
    /**
     * 登录用户缓存名
     */
    private String wholeCacheName;

    public String getSystemSignPortal() {
        return systemSignPortal;
    }

    public void setSystemSignPortal(String systemSignPortal) {
        this.systemSignPortal = systemSignPortal;
    }

    public String getSystemSignDmp() {
        return systemSignDmp;
    }

    public void setSystemSignDmp(String systemSignDmp) {
        this.systemSignDmp = systemSignDmp;
    }

    public String getSystemSignXcips() {
        return systemSignXcips;
    }

    public void setSystemSignXcips(String systemSignXcips) {
        this.systemSignXcips = systemSignXcips;
    }

    public String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    public List<String> getExcludeUrls() {
        return excludeUrls;
    }

    public void setExcludeUrls(List<String> excludeUrls) {
        this.excludeUrls = excludeUrls;
    }

    public List<String> getStaticResourceSufixs() {
        return staticResourceSufixs;
    }

    public void setStaticResourceSufixs(List<String> staticResourceSufixs) {
        this.staticResourceSufixs = staticResourceSufixs;
    }

    public int getTicketTimeout() {
        return ticketTimeout;
    }

    public void setTicketTimeout(int ticketTimeout) {
        this.ticketTimeout = ticketTimeout;
    }

    public int getTicketTimeoutNever() {
        return ticketTimeoutNever;
    }

    public void setTicketTimeoutNever(int ticketTimeoutNever) {
        this.ticketTimeoutNever = ticketTimeoutNever;
    }

    public String getSsoTicketsCacheName() {
        return ssoTicketsCacheName;
    }

    public void setSsoTicketsCacheName(String ssoTicketsCacheName) {
        this.ssoTicketsCacheName = ssoTicketsCacheName;
    }

    public String getWholeCacheName() {
        return wholeCacheName;
    }

    public void setWholeCacheName(String wholeCacheName) {
        this.wholeCacheName = wholeCacheName;
    }
}
